/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Alberto
 */
@Entity
@Table(name = "postulado")
@NamedQueries({
    @NamedQuery(name = "Postulado.findAll", query = "SELECT p FROM Postulado p"),
    @NamedQuery(name = "Postulado.findByCedula", query = "SELECT p FROM Postulado p WHERE p.cedula = :cedula"),
    @NamedQuery(name = "Postulado.findByNombre", query = "SELECT p FROM Postulado p WHERE p.nombre = :nombre"),
    @NamedQuery(name = "Postulado.findByApellido", query = "SELECT p FROM Postulado p WHERE p.apellido = :apellido"),
    @NamedQuery(name = "Postulado.findByTelefono", query = "SELECT p FROM Postulado p WHERE p.telefono = :telefono"),
    @NamedQuery(name = "Postulado.findByEmail", query = "SELECT p FROM Postulado p WHERE p.email = :email"),
    @NamedQuery(name = "Postulado.findByEspecialidad", query = "SELECT p FROM Postulado p WHERE p.especialidad = :especialidad"),
    @NamedQuery(name = "Postulado.findBySeleccion", query = "SELECT p FROM Postulado p WHERE p.seleccion = :seleccion")})
public class Postulado implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "cedula")
    private Integer cedula;
    @Basic(optional = false)
    @Column(name = "nombre")
    private String nombre;
    @Basic(optional = false)
    @Column(name = "apellido")
    private String apellido;
    @Basic(optional = false)
    @Column(name = "telefono")
    private String telefono;
    @Column(name = "email")
    private String email;
    @Basic(optional = false)
    @Column(name = "especialidad")
    private String especialidad;
    @Column(name = "seleccion")
    private Boolean seleccion;

    public Postulado() {
    }

    public Postulado(Integer cedula) {
        this.cedula = cedula;
    }

    public Postulado(Integer cedula, String nombre, String apellido, String telefono, String especialidad) {
        this.cedula = cedula;
        this.nombre = nombre;
        this.apellido = apellido;
        this.telefono = telefono;
        this.especialidad = especialidad;
    }

    public Integer getCedula() {
        return cedula;
    }

    public void setCedula(Integer cedula) {
        this.cedula = cedula;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getApellido() {
        return apellido;
    }

    public void setApellido(String apellido) {
        this.apellido = apellido;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEspecialidad() {
        return especialidad;
    }

    public void setEspecialidad(String especialidad) {
        this.especialidad = especialidad;
    }

    public Boolean getSeleccion() {
        return seleccion;
    }

    public void setSeleccion(Boolean seleccion) {
        this.seleccion = seleccion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cedula != null ? cedula.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Postulado)) {
            return false;
        }
        Postulado other = (Postulado) object;
        if ((this.cedula == null && other.cedula != null) || (this.cedula != null && !this.cedula.equals(other.cedula))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.model.Postulado[cedula=" + cedula + "]";
    }

}
